@extends('admin.base')
@section('main')
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
     <legend>栏目管理</legend>
    </fieldset>
 
    <form class="layui-form"  method="post" action="">
    {!! csrf_field() !!}
	  <div class="layui-form-item">
    <label class="layui-form-label">栏目名</label>
    <div class="layui-input-block">
      <input type="text" name="name" lay-verify="required" placeholder="请输入角色名字" class="layui-input" value="{{$catInfo->name}}">
    </div>
  	</div>

    <div class="layui-form-item">
    <label class="layui-form-label">父栏目</label>
    <div class="layui-input-block">
      <select name="pid" lay-filter="aihao">
        <option value="0">顶级栏目</option>
        @foreach($catData as $v)
        <option value="{{$v->id}}"{{$catInfo->id==$v->id?' selected=""':''}}>{{str_repeat('&nbsp;&nbsp;',$v['lev']).$v->name}}</option>
        @endforeach
      </select>
    </div>
    </div>

    <div class="layui-form-item">
      <label class="layui-form-label">人群性别</label>
      <div class="layui-input-block">
        <input type="radio" name="sex" value="1" title="男" {{$catInfo->sex?'checked=""':''}}">
        <input type="radio" name="sex" value="0" title="女" {{$catInfo->sex?'':'checked=""'}}>
      </div>
    </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
    </form>

<script>
layui.use(['form', 'layer','element'], function(){
  var form = layui.form
  ,$ = layui.jquery
  ,element = layui.element
  ,layer = layui.layer;



});
</script>
@endsection